{{extend 'layout.html'}}

<h2>{{=T('Files')}}</h2>
<table width=100%>
    <tr><th>{{=T('File')}}</th>
    {{if auth.has_membership(auth.id_group('admin')):}}
    <th>{{=T('Action')}}</th></tr>
    {{pass}}
{{for file in files:}}
   <tr>
    <td><a href="{{=URL(r=request,c='default',f='file',args=[file.filename])}}">{{=file.filename}}</a></td>
    {{if auth.has_membership(auth.id_group('admin')):}}
    <td><a href="javascript:;" onclick="location.href='?ren={{=file.id}}&new='+prompt('New Filename')">{{=T('Rename')}}</a> | <a href="?del={{=file.id}}">Delete</a></td>
{{pass}}
   </tr>
   {{pass}}
